package com.app.h5.pic.engine;

import android.content.Context;
import android.widget.Toast;

import com.luck.picture.lib.config.SelectLimitType;
import com.luck.picture.lib.config.SelectorConfig;
import com.luck.picture.lib.entity.LocalMedia;
import com.luck.picture.lib.interfaces.OnSelectLimitTipsListener;

import androidx.annotation.Nullable;

/**
 * ProjectName  TempleteProject-java
 * PackageName  com.lib.base.util.upload
 *
 * @author neo
 * Date         2022/2/9.
 */

public class MeOnSelectLimitTipsListener implements OnSelectLimitTipsListener {

    @Override
    public boolean onSelectLimitTips(Context context, @Nullable LocalMedia media, SelectorConfig config, int limitType) {
        if (limitType == SelectLimitType.SELECT_MAX_VIDEO_SELECT_LIMIT) {
            Toast.makeText(context,context.getString(com.luck.picture.lib.R.string.ps_message_video_max_num, String.valueOf(config.maxVideoSelectNum)),Toast.LENGTH_SHORT).show();
            return true;
        }
        return false;
    }
}